package com.heima.wemedia;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import sun.plugin2.message.Message;

/**
 * @ClassName PublishMessage
 * @Description TODO
 * @Author 10725
 * @Date 2021/9/27 19:39
 **/
@SpringBootTest
@RunWith(SpringRunner.class)
public class PublishMessage {
    @Autowired
    RabbitTemplate rabbitTemplate;
    @Test
    public void pubArtcile() {
        rabbitTemplate.convertAndSend("publish.article.topic","publish.article","你是沙雕");




    }
}
